#include<stdio.h>
#include<sys/types.h>
#include<unistd.h>
#include<stdlib.h>
#include<sys/wait.h>


int main()
{
  printf("this is farther...\n");
  //创建新的子进程进行替换
  pid_t id = fork();
  if(id == 0){
    extern char** environ;
    char* const argv[]=
    {
      (char*)"ls",
      (char*)"-a",
      (char*)"-l",
      NULL
    };
    execvpe("./myprocess2",argv,environ);
    //printf("this is child...\n");
    //exit(0);
  }
  else{
    sleep(10);
  }
}
